home *** CD-ROM | disk | FTP | other *** search
/ 3D Games - Real-time Rend…ng & Software Technology / 3D Games - Real-time Rendering & Software Technology.iso / flysdk / util / flyPlugin / flyplugin.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-11-17  |  1.0 KB  |  44 lines

  1. // flyplugin.cpp : Defines the initialization routines for the DLL.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <afxdllx.h>
  6. #include "flyplugin.h"
  7. #include "flypluginaw.h"
  8.  
  9. #ifdef _PSEUDO_DEBUG
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. static AFX_EXTENSION_MODULE FlypluginDLL = { NULL, NULL };
  15.  
  16. HINSTANCE hInst=0;
  17.  
  18. extern "C" int APIENTRY
  19. DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
  20. {
  21.     hInst=hInstance;
  22.     if (dwReason == DLL_PROCESS_ATTACH)
  23.     {
  24.         TRACE0("FLYPLUGIN.AWX Initializing!\n");
  25.         
  26.         // Extension DLL one-time initialization
  27.         AfxInitExtensionModule(FlypluginDLL, hInstance);
  28.  
  29.         // Insert this DLL into the resource chain
  30.         new CDynLinkLibrary(FlypluginDLL);
  31.  
  32.         // Register this custom AppWizard with MFCAPWZ.DLL
  33.         SetCustomAppWizClass(&Flypluginaw);
  34.     }
  35.     else if (dwReason == DLL_PROCESS_DETACH)
  36.     {
  37.         TRACE0("FLYPLUGIN.AWX Terminating!\n");
  38.  
  39.         // Terminate the library before destructors are called
  40.         AfxTermExtensionModule(FlypluginDLL);
  41.     }
  42.     return 1;   // ok
  43. }
  44.